package com.smart.thrift.discoveryandbalance.discovery;

import lombok.*;

import java.io.Serializable;
import java.util.List;

@Getter
@Setter
@RequiredArgsConstructor
@ToString
@EqualsAndHashCode
public class ThriftServerNode implements Serializable {

    /**
     * 提供服务的主机
     */
    private String host;

    /**
     * 提供服务的主机端口
     */
    private int port;

    /**
     * 提供该服务的标签
     */
    private List<String> tags;

    /**
     * 该服务的超时信息
     */
    private int timeout;

    public ThriftServerNode(String host, int port) {
        this.host = host;
        this.port = port;
    }


    public ThriftServerNode(String host, int port, int timeout) {
        this(host, port);
        this.timeout = timeout;
    }
}
